package com.xiaoyu.lanling.util;

import android.content.Context;
import android.content.pm.PackageManager;

import androidx.annotation.NonNull;

public class AppUtil {

    public static boolean isAppInstalled(@NonNull Context context, String packageName) {
        try {
            return context.getPackageManager().getPackageInfo(packageName, PackageManager.GET_META_DATA) != null;
        } catch (PackageManager.NameNotFoundException e) {
            return false;
        }
    }
}
